package com.ccrfid.rmc6.repository.device;

import com.ccrfid.rmc6.entity.device.AlerterEntity;
import com.ccrfid.rmc6.repository.search.SearchableRepository;
import org.springframework.data.repository.Repository;

import java.util.List;

public interface AlerterRepository extends Repository<AlerterEntity, Long>, SearchableRepository<AlerterEntity> {
    //
    AlerterEntity getById(Long id);
    //
    Boolean existsById(Long id);
    Boolean existsByIp(String ip);
    Boolean existsByIpAndIdNot(String ip, Long id);
    //
    AlerterEntity save(AlerterEntity entity);
    //
    void deleteByIdIn(List<Long> idList);
}
